package com.doubi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doubi.entity.Friend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface FriendMapper extends BaseMapper<Friend> {
    //判断两人是否是朋友
    @Select("select COUNT(*) from friend where userId=#{uid} and userFriend=#{fid}")
    Integer insertFriend(@Param("uid") Integer uid,@Param("fid") Integer fid);

}
